<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>CSS开发带左右按钮自动轮播效果</title>
</head>
<style>
    body,
    ul {
        margin: 0;
        padding: 0;
    }

    li {
        list-style: none;
    }

    .banner {
        width: 1000px;
        height: 466px;
        background-color: aqua;
        margin: 50px auto 0px;
        position: relative;
        overflow: hidden;
    }

    .banner ul {
        /* border: 1px solid black; */
        width: 10000px;
        position: absolute;
        top: 0px;
        left: 0px;
    }

    .banner ul li {
        width: 1000px;
        height: 466px;
        float: left;
    }

    .clearfix {
        content: "";
        display: block;
        clear: both;
    }

    .banner .prev,
    .banner .next {
        width: 41px;
        height: 69px;
        /* border: 1px solid red; */
        position: absolute;
        top: 50%;
        margin-top: -34px;
    }

    .banner .prev {
        left: 0;
        background: url(images/icon-slides.png) -83px 0px;
    }

    .banner .next {
        right: 0;
        background: url(images/icon-slides.png) -125px 0px;
    }

    .banner .prev:hover {
        left: 0px;
        background-position: 0px 0px;
    }

    .banner .next:hover {
        right: 0px;
        background-position: -42px 0px;
    }

    .banner .button {
        width: 100%;
        height: 50px;
        background-color: rgba(0, 0, 0, 0.5);
        position: absolute;
        bottom: 0;
        left: 0;
        text-align: center;
        line-height: 50px;
    }

    .banner .button span {
        width: 10px;
        height: 10px;
        background-color: #fff;
        display: inline-block;
        border-radius: 50%;
        vertical-align: middle;
        /*相对行高的基准线居中*/
    }

    .banner .button {
        font-size: 0px;
    }

    .banner .button span {
        margin: 0px 3px;
    }

    .banner .button span.current {
        background-color: hotpink;
    }
</style>

<body>
    <div class="banner clearfix">
        <ul>
            <li><img src="images/slide-1.png" alt=""></li>
            <li><img src="images/slide-2.png" alt=""></li>
            <li><img src="images/slide-3.png" alt=""></li>
            <li><img src="images/slide-4.png" alt=""></li>
            <li><img src="images/slide-5.png" alt=""></li>
        </ul>
        <!-- 两个按钮 -->
        <div class="prev"></div>
        <div class="next"></div>
        <div class="button">
            <span class="current"></span>
            <span></span>
            <span></span>
            <span></span>
        </div>
    </div>
</body>

</html>